import request from '@/utils/request'

// 获取首页工单详情
export function getTaskInfo(start, end) {
  return request({
    url: `/api/task-service/task/taskReportInfo/${start}/${end}`,
    method: 'get'
  })
}

// 获取一定时间内的订单总数
export function getOrderCount(start, end) {
  return request({
    url: `/api/order-service/report/orderCount?start=${start}+00:00:00&end=${end}+23:59:59`,
    method: 'get'
  })
}

// 获取一定时间范围之内的收入
export function getOrderAmount(start, end) {
  return request({
    url: `/api/order-service/report/orderAmount?start=${start}+00:00:00&end=${end}+23:59:59`,
    method: 'get'
  })
}

// 工单搜索
export function getTaskSearch(params) {
  return request({
    url: `/api/task-service/task/search`,
    method: 'get',
    params
  })
}

// 获取工单详情

export function getTaskdetail(id) {
  return request({
    url: `/api/task-service/task/taskInfo/${id}`,
    method: 'get',
    id
  })
}
